<template>
  <!--   搜索框组件-->
  <el-card shadow="never" :body-style="{paddingBottom:'2px'}">
    <el-form :label-width="labelWidth + 'px'">
      <el-row :gutter="24">
        <el-col :span="19" style="padding: 0">
          <!--          主体内容-->
          <slot/>
        </el-col>
        <el-col :span="5" :xs="24" style="padding: 0;text-align: right">
          <el-button type="primary" @click="search" :disabled="isSearchDisabled">{{ $t('查询') }}</el-button>
          <el-button @click="reset" v-show="showReset">{{ $t('重置') }}</el-button>
        </el-col>
      </el-row>
    </el-form>
  </el-card>
</template>

<script>
export default {
  props: {
    labelWidth: {
      default: 80
    },
    showReset: {
      default: true,
      type: Boolean
    },
    isSearchDisabled: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    search() {
      this.$emit('search')
    },
    reset() {
      this.$emit('reset')
    }
  }
}
</script>

<style scoped>
::v-deep .el-col-19 {
  padding: 0px !important;
}
</style>
